home *** CD-ROM | disk | FTP | other *** search
- > I want to fade only a part of the screen, but i get a Syntax error
- > when i tryed writing in Fade 0,10,10 to 100,100
- > I also checked with the help function i AmosPro, but it dident say
- > anything about how to only fade parts of the Screen.
-
- AMOS doesn't directly support this due to Amiga palettes being
- register-based. If you had a hi-color videocard then it should be
- possible, but then AMOS still wouldn't directly support that either...
-
- So, you have two (or three) real options:
-
- 1. Use a larger palette and use different color-ranges for the
- different parts of the screen. For example, if you wanted to fade
- each quarter of the screen independantly, you could use say
- a 32-color palette and allocate 8 colors for each quarter-screen
- section...
- ----------------
- | A B |
- | C D |
- ----------------
-
- if you only use colors 1-7 for A, colors 8-15 for B, colors 16-23
- for C and colors 24-31 for D then you can simply use the fade
- command to fade in each section according to the colors used in
- that section.
-
- 2. A twist on this if you only need to seperate the screen vertically,
- then of course you can open multiple screens and fade each
- independantly (or horizontal sections of each screen seperately
- using the above technique).
-
-
- 3. Finally, you could generate a light-table consisting of color-
- references for each light-level: HUE_LT(ColorReg#, lightlevel) and
- actually remap the pixels in the rectangular area according to
- this light-table.
-
- You could use a simple palette-matching algorithm to build the
- LT, but the best results would probably be from hand-coded
- color-entries.
-
- The problem with this method is it will be quite slow in AMOS as
- the FadeArea routine would need to rely on Point/Plot to actually
- redraw the screen as it "fades"...
-
- This is similar to the way I implemented fading in my first IBM
- programming (QBasic) as I used EGA-mode which has a fixed
- 16-color palette. If you take a look on my webpage, you can find
- the source (in ASCII) which might be helpful if you are interested
- in this light-table method.
-
-
-
- Take care,
- GARFIELD
- -------------------------
- Current projects...
- SuperStarStrike98(AMIGA&IBM):15% complete(...3 days)
- "Studying" POVray-coding(IBM): 20% complete
- Website(http://www.sosbbs.com/~gbenjam): 35% Complete
-
-